/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package main;

import data.Data;
import sql.SQLiteDB;
import gui.OutputTabs;
import gui.TxtOutput;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

/**
 *
 * @author HADAR
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        //TODO; algorithms names: (configuration, compression)
        //color all scsi configuration ????
        //text area grows with window
        //change color of date window     

        //Look&Feel
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (UnsupportedLookAndFeelException e) {
            e.printStackTrace();
        }
        Data data = new SQLiteDB("database.db");

        
        OutputTabs txtOutput = new OutputTabs(new TxtOutput(), null);
        ToGuiFacade toGuiFacade = new ToGuiFacade(txtOutput);
        Engine engine = new Engine(null, toGuiFacade);	//TODO buttons should be disabled until the data file is selected
        engine = new Engine(data, toGuiFacade);	//TODO for hadar, delete this line :P
        ToEngineFacade toEngineFacade = new ToEngineFacade(engine);
        toGuiFacade.set_toEngineFacade(toEngineFacade);
        gui.Main mainGui = new gui.Main(toEngineFacade);
        mainGui.setVisible(true);        

    }
}
